package com.xia.im.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

@TableName("sys_user")
@KeySequence("sys_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysUser {

    @Schema(name="id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @Schema(name="用户名")
    private String username;

    @Schema(name="昵称")
    private String nickname;

    @Schema(name="头像")
    private String image;
    @Schema(name="密码")
    private String password;
    @Schema(name="性别")
    private Integer sex;
    @Schema(name="状态")
    private Integer status;

    @Schema(name="封禁原因")
    private String reason;
    @Schema(name="个性签名")
    private String signature;

    @Schema(name="最后登录时间")
    private LocalDateTime lastLoginTime;

    @Schema(name="创建时间")
    private LocalDateTime createdTime;
}
